package org.arkeologgr.appening.dataacess;

import java.util.List;

import org.arkeologgr.appening.domain.CultureItem;
import org.arkeologgr.appening.parser.ParserJson;


import android.graphics.Bitmap;

/**
 * Factory class to manage calls either to Mock data or parser data.
 * 
 * @author Mathias Berg
 *
 */
public class DataAccessFactory {

	Service parser;
	
	//ParserJson parser = new ParserJson();
	
	public DataAccessFactory(){
		//parser = new MockService();
		parser = new ParserJson();
	}
	
	public static DataAccessFactory getInstance(){
		return new DataAccessFactory();
	}
	
	public void addCultureItem(CultureItem item, Bitmap image) throws Exception{
		parser.addCultureItem(item, image);
		
	}
	
	public CultureItem getItemDetail(String id) throws Exception{
		return parser.getItemDetail(id);
		
	}
	
	public List<CultureItem> getAreaItems(String lon1, String lat1, String lon2, String lat2) throws Exception{
		return parser.getAreaItems(lon1, lat1, lon2, lat2);
		
	}
	
	
}
